home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
byte0287.arc
/
POLY.BAS
< prev
Wrap
BASIC Source File
|
1986-10-29
|
306b
|
17 lines
10 DIM X(50),Y(50)
20 READ N
30 FOR K=1 TO N
40 READ X(K),Y(K)
50 NEXT K
60 X(0)=X(N)
70 Y(0)=Y(N)
80 AREA=0
90 FOR K=0 TO N-1
100 AREA=AREA + X(K) * Y(K+1) - X(K+1) * Y(K)
110 NEXT K
120 AREA = .5 * ABS(AREA)
130 PRINT "Enclosed area is "; AREA
140 END
150 DATA 4
160 DATA 4,3,4,1,1,4,3,4